package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.MallUserExtend;
import com.appkubes.mall.core.po.MallUserExtendExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface MallUserExtendMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_extend
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallUserExtendSqlProvider.class, method="countByExample")
    long countByExample(MallUserExtendExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_extend
     *
     * @mbg.generated
     */
    @DeleteProvider(type=MallUserExtendSqlProvider.class, method="deleteByExample")
    int deleteByExample(MallUserExtendExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_extend
     *
     * @mbg.generated
     */
    @Delete({
        "delete from mall_user_extend",
        "where user_key = #{userKey,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String userKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_extend
     *
     * @mbg.generated
     */
    @Insert({
        "insert into mall_user_extend (user_key, app_key, ",
        "sms_code, client_id, ",
        "version)",
        "values (#{userKey,jdbcType=VARCHAR}, #{appKey,jdbcType=VARCHAR}, ",
        "#{smsCode,jdbcType=VARCHAR}, #{clientId,jdbcType=VARCHAR}, ",
        "#{version,jdbcType=INTEGER})"
    })
    int insert(MallUserExtend record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_extend
     *
     * @mbg.generated
     */
    @InsertProvider(type=MallUserExtendSqlProvider.class, method="insertSelective")
    int insertSelective(MallUserExtend record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_extend
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallUserExtendSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="user_key", property="userKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="sms_code", property="smsCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="client_id", property="clientId", jdbcType=JdbcType.VARCHAR),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallUserExtend> selectByExampleWithRowbounds(MallUserExtendExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_extend
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallUserExtendSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="user_key", property="userKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="sms_code", property="smsCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="client_id", property="clientId", jdbcType=JdbcType.VARCHAR),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallUserExtend> selectByExample(MallUserExtendExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_extend
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "user_key, app_key, sms_code, client_id, version",
        "from mall_user_extend",
        "where user_key = #{userKey,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="user_key", property="userKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="sms_code", property="smsCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="client_id", property="clientId", jdbcType=JdbcType.VARCHAR),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    MallUserExtend selectByPrimaryKey(String userKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_extend
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallUserExtendSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") MallUserExtend record, @Param("example") MallUserExtendExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_extend
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallUserExtendSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") MallUserExtend record, @Param("example") MallUserExtendExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_extend
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallUserExtendSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MallUserExtend record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_extend
     *
     * @mbg.generated
     */
    @Update({
        "update mall_user_extend",
        "set app_key = #{appKey,jdbcType=VARCHAR},",
          "sms_code = #{smsCode,jdbcType=VARCHAR},",
          "client_id = #{clientId,jdbcType=VARCHAR},",
          "version = #{version,jdbcType=INTEGER}",
        "where user_key = #{userKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(MallUserExtend record);
}